from rest_framework import serializers
from schools.models import Student, Article


class StudentSerializer(serializers.ModelSerializer):
    class Meta:
        model = Student
        fields = ('name', 'age', 'address', 'created')


class ArticleSerializer(serializers.ModelSerializer):
    class Meta:
        model = Article
        fields = ('title', 'date', 'author', 'keyword', 'created')
